package de.web;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import de.preisrobot.entity.Statistik;
import de.preisrobot.persistence.dao.StatistikDao;

@Controller
public class JSONStatistikController {

	@Resource(name="statistikDao")
	private StatistikDao dao;
	
	@RequestMapping(value="statistik" ,method=RequestMethod.GET)
	public @ResponseBody List<Statistik> getStatistik ()
	{
		System.out.println("\n\n  statistik: ");
		 
		List<Statistik> find = dao.getStatistik();
		
		return find;
	}
}
